package com.xbongbong.paas.feign;

import com.xbongbong.paas.pojo.dto.ApplicationAddDTO;
import com.xbongbong.paas.pojo.vo.ApplicationAddVO;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.appmodule.pojo.dto.AppModuleOpenDTO;
import com.xbongbong.pro.appmodule.pojo.vo.AppModuleOpenVO;
import com.xbongbong.pro.menu.pojo.dto.MenuChangeStateDTO;
import com.xbongbong.pro.menu.pojo.vo.MenuChangeStateVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name = "pro-web-pc", contextId = "moduleCenterFeignClient")
public interface ModuleCenterFeignClient {

    @RequestMapping(value = "/pro/v1/menu/changeState", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<MenuChangeStateVO> changeState(MenuChangeStateDTO menuChangeStateDTO);

    @RequestMapping(value = "/pro/v1/app/add", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<ApplicationAddVO> addApp(ApplicationAddDTO applicationAddDTO);

    @RequestMapping(value = "/pro/v1/appModule/open", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<AppModuleOpenVO> openApp(AppModuleOpenDTO openDTO);
}
